'''
Created on 14/02/2011

@author: Vinicius
'''

#Teste do algoritmo kmeans do pacote scipy

from scipy.cluster.vq import whiten, kmeans2
from funcoes import define_input

k=3
result = define_input('iris.data')
normalized = whiten(result[0])
codebook = kmeans2(normalized,k)

for i in range(len(codebook[1])):
    print result[1][i]+ ' ,classe: '+str(codebook[1][i])
